﻿using System;
using System.Collections.Generic;
using System.Text;
using RobotRace.Geometry;

namespace RobotRace.utils.graph
{
    public class Node
    {
        public int nodeID { get; set; }
        public int nodeNumberOnPath { get; set; }
        public Point2D point { get; set; }
        public List<Edge> edges { get; private set; }

        public Node()
        {
            edges = new List<Edge>();
        }

        public Node(Point2D point) : this()
        {
            this.point = point;
        }

        public void addEdgeTo(Node toNode, double weight)
        {
            Edge edge = new Edge(this, toNode, weight);
            this.edges.Add(edge);
        }
    }
}
